<template>
  <div class="kefu-main">
    <div role="dialog" aria-labelledby="未登录" class="van-dialog" style="z-index: 2040;">
      <div class="van-dialog__header" style="font-size: 14px;">优一家商城官方客服</div>
      <div class="van-dialog__content">
        <div style="text-align: center;">
          <img style="max-width: 80%;" src="../../assets/img/yyj_kefu_ewm.jpg">
          <div style="font-size: 12px;color: #bbb;">
            <div v-if="!isWeixin">请用微信扫描二维码</div>
            <div v-if="isWeixin">长按识别二维码</div>
            <div>联系客服</div>
          </div>

        </div>

      </div>
      <div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons" style="margin-top: 15px;">
        <van-button @click="goHome();" style="border-color: #fff;color: #f44;" plain hairline type="primary" size="large">返回首页</van-button>
      </div>
    </div>

  </div>
</template>

<script>
  import util from '../../../../../static/mobile/js/util';
  export default {
    name:'kefu',
    data() {
      return {
        isWeixin:false
      };
    },
    methods: {
      goHome() {
        var url = window.location.origin + window.location.pathname+'?vt='+new Date().getTime() + '#/index?auth=1';
        window.location.href = url;
      },
      goUrl(url) {
        this.$nocacheRouter(url);
      }
    },
    mounted(){
      this.isWeixin = util.is_weixn();
    }
  };
</script>

<style scoped>

</style>
